/* 强制覆盖所有代码块样式 */
.v-md-editor pre[class*="language-"],
.v-md-editor code[class*="language-"],
.v-md-pre-wrapper,
.v-md-preview pre[class*="language-"],
.v-md-preview code[class*="language-"],
pre[class*="language-"],
code[class*="language-"],
.v-md-editor .v-md-editor__editor pre,
.v-md-editor .v-md-editor__preview pre,
.v-md-preview .v-md-preview__preview pre,
.prism-editor__code,
.prism-editor__line,
.prism-editor__container,
.prism-editor__editor {
  background-color: #f5f5f5 !important;
  color: #333 !important;
  text-shadow: none !important;
}

/* 增强表格样式 */
.v-md-editor .github-markdown-body table,
.v-md-preview .github-markdown-body table {
  border-collapse: collapse;
  margin: 1rem 0;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.v-md-editor .github-markdown-body th,
.v-md-preview .github-markdown-body th {
  background-color: #f8f9fa;
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid #dee2e6;
}

.v-md-editor .github-markdown-body td,
.v-md-preview .github-markdown-body td {
  padding: 12px 16px;
  border-bottom: 1px solid #dee2e6;
}

.v-md-editor .github-markdown-body tr:hover,
.v-md-preview .github-markdown-body tr:hover {
  background-color: #f8f9fa;
}

/* 任务列表样式 */
.v-md-editor .github-markdown-body .task-list-item,
.v-md-preview .github-markdown-body .task-list-item {
  list-style: none;
  margin: 0.5rem 0;
}

.v-md-editor .github-markdown-body .task-list-item input,
.v-md-preview .github-markdown-body .task-list-item input {
  margin-right: 8px;
  transform: scale(1.2);
}

/* 引用块增强样式 */
.v-md-editor .github-markdown-body blockquote,
.v-md-preview .github-markdown-body blockquote {
  border-left: 4px solid #4a6baf;
  background-color: #f8f9fa;
  padding: 16px 20px;
  margin: 1rem 0;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 标题样式增强 */
.v-md-editor .github-markdown-body h1,
.v-md-preview .github-markdown-body h1 {
  border-bottom: 3px solid #4a6baf;
  padding-bottom: 8px;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.v-md-editor .github-markdown-body h2,
.v-md-preview .github-markdown-body h2 {
  border-bottom: 2px solid #6c8eef;
  padding-bottom: 6px;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
}

/* 内联代码样式 */
.v-md-editor .github-markdown-body code:not([class*="language-"]),
.v-md-preview .github-markdown-body code:not([class*="language-"]) {
  background-color: #f1f3f4;
  color: #d73a49;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 500;
}

/* 链接样式增强 */
.v-md-editor .github-markdown-body a,
.v-md-preview .github-markdown-body a {
  color: #4a6baf;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.v-md-editor .github-markdown-body a:hover,
.v-md-preview .github-markdown-body a:hover {
  color: #3f51b5;
  border-bottom-color: #3f51b5;
}

/* 强制覆盖所有代码文本颜色 */
.v-md-editor *,
.v-md-preview *,
.token,
.token.tag,
.token.attr-name,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted,
.token.selector,
.token.attr-value,
.token.string,
.token.char,
.token.builtin,
.token.inserted,
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.atrule,
.token.attr-value,
.token.keyword,
.token.function,
.token.class-name,
.token.regex,
.token.important,
.token.variable,
.token.punctuation,
.token.property,
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata,
.prism-editor__line-number,
.prism-editor__line,
.v-md-editor__editor .prism-editor__line {
  color: #333 !important;
  text-shadow: none !important;
  background: transparent !important;
}

/* 特殊代码颜色 - 保持语法高亮但使用深色 */
.token.comment { color: #708090 !important; }
.token.string { color: #008000 !important; }
.token.keyword { color: #0000ff !important; }
.token.number { color: #aa0000 !important; }
.token.function { color: #aa6600 !important; }

/* 完全自定义复制按钮 */
.v-md-copy-code-btn,
.copy-code-btn {
  position: absolute !important;
  top: 5px !important;
  right: 5px !important;
  width: auto !important;
  height: auto !important;
  min-width: 50px !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  background-color: #e9ecef !important;
  border: 1px solid #ced4da !important;
  border-radius: 4px !important;
  color: #333 !important;
  text-align: center !important;
  cursor: pointer !important;
  z-index: 9999 !important;
  opacity: 0.8 !important;
  transition: opacity 0.2s !important;
  font-weight: normal !important;
  box-shadow: none !important;
  text-shadow: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  word-spacing: normal !important;
  text-indent: 0 !important;
  text-decoration: none !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.v-md-copy-code-btn:hover,
.copy-code-btn:hover {
  opacity: 1 !important;
  background-color: #dee2e6 !important;
}

/* 移除所有伪元素 */
.v-md-copy-code-btn::before,
.v-md-copy-code-btn::after,
.copy-code-btn::before,
.copy-code-btn::after,
.v-md-pre-wrapper::before,
.v-md-pre-wrapper::after,
.v-md-preview pre[class*="language-"]::before,
.v-md-preview pre[class*="language-"]::after,
pre[class*="language-"]::before,
pre[class*="language-"]::after {
  display: none !important;
  content: none !important;
}

/* 代码块样式 */
.v-md-pre-wrapper,
.v-md-preview pre[class*="language-"],
pre[class*="language-"] {
  border-radius: 6px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  margin: 1rem 0 !important;
  position: relative !important;
  overflow: hidden !important;
  background-color: #f5f5f5 !important;
  border: 1px solid #e0e0e0 !important;
  padding: 1rem !important;
}

/* 隐藏行号 */
.line-numbers-wrapper,
.prism-editor__line-numbers {
  display: none !important;
  width: 0 !important;
}

/* 修复编辑器内容区域 */
.v-md-editor__editor,
.v-md-editor__preview,
.v-md-preview__preview {
  padding-left: 0 !important;
}

.prism-editor__textarea,
.prism-editor__editor {
  padding-left: 15px !important;
}